package com.karaoke.android.library.mvvm

/**
 * Created by Administrator on 2016/12/2.
 */
interface MvvmViewModel
{
    /**
     * Called when this ViewModel instance was created.
     *
     *
     * This is a place to do any initialisation.
     */
    abstract fun onCreate()

    /**
     * Called when this ViewModel was binded to a view and the view is visible.
     */
    abstract fun onResume()

    /**
     * Called when this ViewModel was unbinded from a view or view was paused.
     *
     *
     * Don't interact with view after this method was called
     * (e.g. show toast or start new activity).
     */
    abstract fun onPause()

    /**
     * Called when this ViewModel instance was destroyed and removed from cache.
     *
     *
     * This is a place to do any cleanup to avoid memory leaks.
     */
    abstract fun onDestroy()

    abstract fun onStart()

    abstract fun onStop()
}